//对外暴露配置路由(常量路由):全部用户都可以访问到的路由
import setting from '@/setting'
const managementLayout = () => import('@/layout/index.vue')
const largeScreenLayout = () => import('@/layoutLargeScreen/index.vue')
const Layout = setting.isLargeScreen ? largeScreenLayout : managementLayout
export const constantRoute = [
     {
          //登录成功以后展示数据的路由
          path: '/',
          component: Layout,
          name: 'layout',
          meta: {
               title: '首页',
               hidden: false,
               icon: 'iconfont icon-shujuzhexiantu',
               isLargeScreen: true,
          },
          redirect: '/hiddenDangerRecords',
          children: [
               {
                    path: '/hiddenDangerRecords',
                    component: () => import('@/views/hiddenDangerRecords/index.vue'),
                    meta: {
                         title: '隐患记录',
                         hidden: false,
                         icon: 'iconfont icon-shujuzhexiantu',
                         isLargeScreen: true,
                    },
               },
               {
                    path: '/meetRecords',
                    component: () => import('@/views/meetRecords/index.vue'),
                    meta: {
                         title: '会议记录',
                         hidden: false,
                         icon: 'iconfont icon-shujuzhexiantu',
                         isLargeScreen: true,
                    },
               },
               {
                    path: '/supervisionRecords',
                    component: () => import('@/views/supervisionRecords/index.vue'),
                    meta: {
                         title: '督导记录',
                         hidden: false,
                         icon: 'iconfont icon-shujuzhexiantu',
                         isLargeScreen: true,
                    },
               },
               {
                    path: '/userManagement',
                    component: () => import('@/views/userManagement/index.vue'),
                    meta: {
                         title: '用户管理',
                         hidden: false,
                         icon: 'iconfont icon-shujuzhexiantu',
                         isLargeScreen: true,
                    },
               },
          ],
     },
     {
          //登录
          path: '/login',
          component: () => import('@/views/login/index.vue'),
          name: 'login',
          meta: {
               title: '登录', //菜单标题
               hidden: true, //代表路由标题在菜单中是否隐藏  true:隐藏 false:不隐藏
               icon: 'Promotion', //菜单文字左侧的图标,支持element-plus全部图标
          },
     },
]
//异步路由
export const asnycRoute = []
//任意路由
export const anyRoute = {
     //任意路由
     path: '/:pathMatch(.*)*',
     redirect: '/404',
     name: 'Any',
     meta: {
          title: '任意路由',
          hidden: true,
          icon: 'DataLine',
     },
}
